Brooke and hokiefyd are giving you great advice. I disagree with hokie a bit about water (see below), but "be prepared to hear contradictory advice and experiment a bit to see what works for you" is part of the advice I would give you.
Rack--If you want to put a rack on and don't have disk brakes, I recommend the Planet Bike Eco Rack. It's light, cheap, and extremely durable, I've had them last decades of hard use. They're also absurdly easy to mount, all you need is allen wrenches and some machine oil for the bolts.
Lights--I find the easiest thing to do is to buy ones I can put on and off of my helmet. The USB rechargeable lights are the most economical long-run. Do not overspend to get ridiculously bright lights unless you intend to do mountain biking at night. Too bright actually creates unsafe situations on the road..
Clothes--I ride really long distances (several centuries a month, and none of that metric nonsense) and find no use for expensive bike clothes. I just buy air-dry t-shirts, preferably bright yellow for visibility, and gym shorts. You might find you feel better in bike clothes, but don't let anyone tell you it's a necessity.
Tools- get one of those combination tool things that look like Swiss Army Knives for bikes. None of the tools will be perfect, but the goal is to have just enough to get you back rolling when a minor mechanical issue arises--things can definitely work themselves loose over a long ride, especially on rough road. These usually have a full allen wrench set, phillips and flat screwdriver, some socket wrenches, and are also sold with a pair of tire levers, which you'll also want with you.
Bags - Banjo Brothers is the best combination of quality and price I've found. I have a trunk bag that folds out into a bunch of different configurations, so i can run it at just about any reasonable volume for a long ride.
Water - I definitely don't subscribe to the drink when you're not thirsty school. It is possible to over-hydrate, which can result in a condition called hyponatremia where your blood sodium is too low. I've experienced this and it's not fun. If you drink a lot of water, you should eat something with salt in it, you're sweating salt out too. I also only carry one water bottle with me, and if the ride is 30 miles or less, no water bottles unless it's really hot. I've just found that I generally don't get thirsty before 30 miles, and I generally wouldn't touch a second water bottle until about 80 miles, by which point, I would have stopped somewhere I could refill. I used to always carry two bottles, but realized that water weighs a lot, and when I carried less, I also needed less.
Lock - Alas, you will have to carry one if you're going on long rides unless you want to bring the bike into the bathroom with you (don't). Locks also let you take breaks and see things, or have a meal off the bike, or go to the museum, or any of the other dozens of things one can make a part of your trip that day. I keep my lock in my trunk bag because everywhere else, it seems to work its way loose and get in the way.
Food - Experiment. I find that a lot of the things people say will make you feel sick just don't have any effect on me. If you're biking for several hours, you will need to eat at some point. If you can't tolerate anything heavy, I recommend packing some apples. I can eat those while riding, and you get some hydration and a quick energy boost.
I'll amplify what Brooke said a little bit--practice changing a tire at home with the equipment you'll have to use on the road, including the hand pump (unless you're going with CO2), If you have Presta stems on your tires, you want to find out if your pump doesn't work for them at home, not somewhere where you might end up walking your bike 10 miles. Even if your hand pump says it works with Presta, confirm this. I've had a couple pumps where that has been a bit of false advertising. I definitely suggest taking off the rear wheel, deflating the tire, take the tube out, replace the tube back in, reseat the tire, and put the wheel back on at home so you can be sure you know how to do it. The back wheel is trickier, and make sure you don't let the chain get twisted. You'll want to make sure you know how to release your brakes to take the wheel off, and reset them when the wheel is put back on. YouTube videos are great for learning how to do this stuff.