I've read that they are 90% efficient compared to linear regulators so given the relationship between volts and amps and I want to power the project off of a 12v battery that has 18Ah and is charged using a small solar cell. The project itself only needs 5v, so if I buck the voltage down to less than half the required voltage, wouldn't the amp hours close to double giving me 36+ Ah? Or am I missing something about the relationships between volts and amps and the mechanism of the buck converter?
You are kind of on the right track.
The amp-hour rating of the battery specifies how many hours you could pull a certain rated current from the battery.
The buck converter to 5V won't change the amp-hour rating of the battery at all. But if you were to only pull half of the current from the battery then the battery will last twice as long.
So let's make an example here. As you stated you have a 12V 18AH battery. Let us consider, for sake of example, that your load at the stated 5V required 500mA (i.e. 0.5A) to run.
If you were to use a linear regulator to drop the battery 12V down to 5V the linear regulator would pull 0.5A from the battery and radiate (12V-5V)*0.5A = 3.5 Watts of energy as heat whilst delivering the 5V to the load. The 12V battery delivering the 0.5A would supply the regulator for 18AH/0.5A = 36 hours. The efficiency of such a system is EnergyOut / EnergyIn = (5V * 0.5A)/(12V * 0.5A) = 41.6% efficiency.
So if instead you used the buck switching regulator at 90% efficiency we can evaluate the battery life. The buck regulator operates as:
Energy Out = 0.9 * Energy In.
With a load of 5V @ 0.5A the energy being delivered out of the buck regulator is 5V*0.5A = 2.5W. Applying the 90% efficiency formula the regulator input energy would be 2.5W/0.9 = 2.78W. This wattage at 12V corresponds to 2.78W/12V = 0.231A draw from the battery. At this lower current the battery would last 18AH/0.231A = 77.9 hours.
As you can see the battery usage is hugely more efficient.
Amp hours are not a great way of measuring battery capacity. Watt hours is a much better figure. If you stick a buck converter after the battery, the equivalent watt hours of the battery will decrease by the loss in the converter. However, since the converter will draw fewer amps from the battery, the equivalent amp hours will increase. This isn't necessarily the greatest comparison, though, as in this case the equivalent amp hours are at a different voltage after the converter.
To expand on what alex.forencich said, since it was apparently not well understood, what you are missing is that amp-hours is a good way of comparing batteries at the same output voltage. It's not a good way to compare batteries at different output voltages... or once you buck or boost the voltage.
When you pass the output of a battery through a theoretical DC-DC converter that has 100% efficiency, the Watt-hour rating stays the same; the amp-hour rating being Watt-hour/volts can go up or down depending whether the converter is buck or boost. E.g. 3Wh battery (1.5V*2Ah) can become 0.2Ah if we boost the voltage 10 times [to 15V] or can become 20Ah if we buck the voltage 10 times [to 0.15V]. And to address what Nick Alexeev said; this is as the battery is seen through the other (=output) side of the converter. Of course the Ah of the battery itself doesn't change.
But no practical DC-DC converter has 100% efficiency, so the converted power needs to be adjusted (multiplied) by the converter's efficiency. E.g. if the converter has 90% efficiency, the 3Wh rating becomes 2.7Wh after conversion. That's regardless of what the voltage you convert to is.
And regarding "90% efficient compared to linear regulators", you probably mean they can have 90% absolute efficiency. Linear regulators have maximum theoretical efficiency given by Vout/Vin; so for 12V to 5V conversion, a linear regulator cannot exceed 41.66% efficiency, and in practice will be less than that. And indeed a linear regulator cannot boost amp-hours because of this. Let's say you have X Wh at the Vin (inpt) voltage. This becomes XVout/Vin Wh at the Vout voltage; Vout is always less than Vin for a linear regulator. Now divide this XVout/Vin Wh by the output voltage to obtain X/Vin Ah at the output; that's exactly the same Ah rating as at the original/input voltage [for an ideal linear regulator], but note we have a [usually large] loss of energy/power because Vout is [significantly] lower than Vin.
So to summarize; no converter [switching or linear] can increase the Wh rating. A linear one cannot increase the Ah rating either.