My car won't crank over and the lights dim when ignition is in the on position?

I just put a new engine in my 1976 Ford Gran Torino and I hooked up a new battery, new solenoid, and new cables and I wanted to see if it would crank over and it did crank over but later that day I went to crank it over again and I put the key in and turned it to the on position and the lights dim then when I try to start it the lights get bright and another thing I noticed was that when the car is able to turn over the headlights work and stuff like the windshield wipers work and when its not working those things don't work and at first I was able to unplug everything from the starter solenoid and hook it back up and sometimes it worked for a little bit.

I would make sure all the connections are tight starting with the battery terminals. Battery terminals have been known to feel really tight, but still not work. Make sure the ground wire hasn't been attached to a painted surface. If it has, then scratch through the paint and make sure it is grounded to metal. Just double check every connection - starter relay/ solenoid, starter, alternator. I think Ford called the solenoid on the firewall a starter relay.

I assume the starter is new or rebuilt. As starters get older, they require more and more amps until they just won't start at all. Maybe the starter is old and requires lots of amps to turn, and the new battery turned it once but isn't able to more. Put a battery charger on the battery and give it a full charge.

Take your 12 volt battery to any store that sells new ones other than Auto Zone. Ask for a free 15 second battery load test to see what the reserve amperage capacity is. Amperage spins starter motors not volts.

Mooned YA is correct, make sure all your connections are clean.