Adequate lighting is very important to keeping a Dionaea muscipula healthy. During their active growing season, Venus Fly Traps should receive a minimum of 12 hours of light (also known as a 12 hour photoperiod) with a minimum of 4 hours of direct sunlight, if you're growing your Venus Flytraps outside. In general, the more direct light the plant receives the healthier the plant will be.
The best place to grow Venus Fly Traps is outside year round. If you do this, choose an open area to put your plants in and you won't have to worry about making sure that the plant gets adequate light. They will get all the light that they need. Also, they will catch their own food if they are outside. If you really want to keep your little friend inside, then be sure to place it in a south, east or west facing windowsill that gets at least 4 hours of direct sunlight a day. Another alternative is to use artificial lighting. Venus Fly Traps can be very successfully grown in terrariums with artificial lighting. You can find many different kinds of expensive "plant" lights at your local nursery or hardware store, but many growers find success with regular fluorescent lights. If you use fluorescent lights, to ensure that the plant gets enough light, keep it within 8 inches of the light. The closer to the light the plant is the better.
Below is a picture of a setup of typical Venus Fly Traps in a terrarium. Notice the fluorescent lights just above the plants. In the photo, the plants are approximately 2 inches from the light.
If you just bought a Venus Fly Trap from the hardware store or other retailer where the plant was receiving very low intensity light and wasn't in direct sunlight at all, then you might want to slowly introduce the plant to direct sunlight or its leaves will probably burn. Start off by giving it an hour or so of direct sunlight for a few days, then increase the exposure to sunlight to a couple hours for a few days and continue to increase the Venus Fly Trap's exposure to sunlight until you can just leave it out in the sun all day. Alternatively, you could just put the plant in direct sunlight right out of the store. All of its leaves will probably burn and turn yellow or brown and then eventually black, but it won't be long before it starts sending out new leaves and these will be acclimated to the sun just fine. However, there is a small risk of killing the plant if you do just throw it out in the sun.
Growing your Venus fly trap indoors
If for some reason you're unable to grow your Venus fly trap outside where it can get all the sunlight and bugs it needs, there are a few options for indoor growers. After growing outdoors, a sunny window that faces south is your next best option. As long as the Venus fly trap receives 4+ hours of direct sunlight in the window, it should grow well. An east or west facing windowsill can work too.
If you live in a basement or in an apartment with only north facing windows, you might have to use artificial lighting to help your plant grow well. Venus fly traps grow great under fluorescent lights. However, the hard part is providing them with a proper dormancy. If grown under fluorescent lights year round with the same amount of light each day and no dormancy period, Venus fly traps will eventually die. People have successfully grown their plants under lights during the summer and then put them in a cool windowsill, unheated porch or garage, or outside (in milder climates) for their winter dormancy.
When choosing a lighting setup for your Venus fly trap, an economical choice is a compact fluorescent bulb. Look for a bulb that's labeled "cool white" or "cool blue" in color temperature. This means that the bulbs will have a color temperature in the 6500 kelvin range, which is ideal for growing. Warmer colors, like those in the 3000 kelvin range, are better suited for flowering. I've seen 200 watt compact fluorescent bulbs with a color temperature of 6500K for sale at $20 including shipping. One bulb like that would work well for a few Venus fly traps. If you want to set up that will allow you to grow more plants, you can purcahse a shop light fixture and T8 bulbs for $10 each at Wal-Mart or other large retail and hardware stores. Again, look for the "cool white" T8 bulbs.