There are several considerations for lighting a 3-5 gallon aquarium. (If you don’t have live plants, though, you can ignore this section and do whatever you like.)
I run my tank light plugged into a digital timer. For the sake of my plants, it’s on from 9 in the morning to 10 at night, since my light is relatively weak. (Most very small aquariums come with weak lighting, for reasons too complicated to go into). I never have to touch it to turn it on or off, and the timer even “remembers” what time it is and my instructions after it’s been unplugged for a water change.
To evaluate your own light considerations for live plants, start by taking a look at your hood setup. Where is the light placed? How powerful is it? (Not very powerful, probably.) The rule of thumb is that any plants directly below your light bulb will have the best odds at surviving, growing, and generally doing well.
For example, my 5 gallon hex tank has a light that sits in the front half of the hood (the back is taken up with filtration). This means that I tend to get weak lighting in the back. And experience has borne the theory out — I’ve had little success trying to get things to grow in the back of my tank, but a good amount of success in the front two-thirds of the tank.
The rule of thumb is that a 3-5 gallon tank is limited to low light plants and very low light plants. The best strategy is usually to plant very low light plants in areas that aren’t directly under your light bulb and save the merely low light plants for the areas that are directly under the bulb.