If it is not warm enough, your turtle will not be interested in eating. For a three-toed, eastern, or Gulf Coast box turtle this means day time temperatures around 75 F with a basking spot of 85-88 F. Ornate and Asian box turtles need slightly warmer temperatures.
Exposure to ultraviolet light is very important for metabolism and may stimulate your turtle's appetite. If your climate is agreeable, time in an outdoor pen with exposure to natural sunlight is ideal (exposure to sunlight through glass does not count). If you can't get your turtle outdoors for at least a few hours a day, you need to get ultraviolet lighting that produces UVA and UVB light. Special bulbs are available for this purpose for reptiles. Follow the manufacturer's instructions for how far the lights should be located from your turtle and how often to replace the bulb.
For specific care information for some different species of box turtles commonly kept as pets, see Box Turtle Species
Though box turtles are not that large of an animal, they need a large enclosure in order to thrive. Juveniles can sometimes adapt to a large aquarium. However, box turtles seem to do best in an outdoor enclosure, ideally all year where the climate allows and at least part of the time in other places. When kept indoors (as hatchlings or when cold weather forces them indoors), give them as large a terrarium as possible that is well landscaped, with the approprite UV lights and heating. See Outdoor Pens for Box Turtles for more on housing.
It is important to make sure you are feeding a good variety of food choices. Juveniles tend to be more carnivorous so concentrate on favorites like slugs and earthworms and other live items (make sure they are pesticide free!). Also offer some vegetables, such as dandelion and collard greens, shredded carrots, and small amounts of fruits (bananas and strawberries tend to be popular). A full list of items to try feeding can be found in Feeding Your Box Turtles. Feeding a variety is important.
Try offering food first thing in the morning as this is when box turtles naturally tend to look for food. Also, depending on the weather (too hot, too cool etc) your turtle just might not be interested in eating much.
If your new turtle has gone several days without eating, it might be a good idea to check with your vet to rule out medical problems.