If you are talking about running lights, you can buy a one-piece thingie that has the red light and green light and has batteries in it. You can attach it on your bridle, probably where it meets the forestay.
For a stern light, you could probably just attach a flashlight somewhere at the back of the boat.
Technically, small sailboats are not required to have running lights, and you can just use a flashlight to shine on the sail intermittently. But running lights are a better idea if you are going to do a lot of night-sailing.