Lamp specifications So when a lamp has a specification of 24 V, 5.0 W, does it mean that it requires at least 5.0 W to work? Can it still consume more power? Or would it then fail? If for example a power supply has current 8.0 A and potential difference of 24 V, and lamps are connected in parallel, the maximum number of lamps we can insert is 192 W / 5.0 W = 38 lamps. But if we were to have 30 lamps for example, each lamp would receive 6.4 W?
 A: Lamps have more or less constant resistance. You can calculate its (nominal) resistance from its voltage and power rating as $R_\star = U_\star^2/P_\star$. Note that I use subscript $\star$ to indicate rated (nominal) values, which does not necessarily equal to actual values for which I will use subscript $o$. You can safely assume the resistance $R_\star$ is constant.
If you connect the lamp to a constant voltage source $U_o$, the operating current through the lamp will be $I_o = U_o/R_\star$ and the operating power is $P_o = U_o I_o = U_o^2/R_\star^2$. Note that constant voltage sources have maximum current rating, which means they will generate the required voltage as long as required current is less than its maximum current. If more current is requested, the voltage is dropped such that the operating current does not exceed the maximum current rating.
The (actual) operating power $P_o$ is not the same as rated power $P_\star$, but it depends on the operating voltage and current. Electrical power is converted to light and heat in a lamp, and more electrical power means more light and heat. The rated power tells you what is the operating power if you connect the lamp on the rated voltage.

Can it still consume more power? Or would it then fail?

The lamp could consume more electrical power, but that implies more heat and the lamp will die much sooner than if operated at rated or below-rated power.

But if we were to have 30 lamps for example, each lamp would receive 6.4 W?

To answer this question simply draw a circuit with resistors and then calculate operating power. A $24 \text{ V}$, $5 \text{ W}$ lamp has nominal resistance of $R_\star = 115.2 \text{ }\Omega$. Let’s discuss two examples: $N = 30$ and $N = 60$ lamps connected in parallel to $U_s = 24 \text{ V}$ and $I_\text{max} = 8 \text{ A}$ constant voltage source.
Example 1: 30 lamps in parallel
The total resistance is $R_\text{tot} = R_\star/N = 3.84 \text{ }\Omega$ and the requested current is $U_s / R_\text{tot} = 6.25 \text{ A}$. Since requested current is less than the maximum current, i.e. $6.25 \text{ A} < 8 \text{ A}$, operating voltage and current on the supply terminals is $U_o = 24 \text{ V}$ and $I_o = 6.25 \text{ A}$ and the total power output is $P_o = U_o I_o = 150 \text{ W}$. The total power is divided to $N = 30$ equals branches, which means that each branch receives $5 \text{ W}$. This is as expected since each lamp is connected to $24 \text{ V}$ and the power supply operates within its limits.
Example 2: 60 lamps in parallel
The total resistance is $1.92 \text{ }\Omega$ and the required current is $12.5 \text{ A}$. Since power supply cannot generate more than $8 \text{ A}$ it will saturate at the maximum current $I_o = 8 \text{ A}$ and its output voltage will drop to $U_o = I_\text{max} R_\text{tot} = 15.36 \text{ V}$. The total output power is now $P_o = 122.88 \text{ W}$ and each lamp receives only $2.048 \text{ W}$. The operating power for each lamp is lower than the rated power due to the power supply limitations.
A: 
So when a lamp has a specification of $24\text{ V}$, $5.0\text{ W}$,
does it mean that it requires at least $5.0\text{ W}$ to work?
Can it still consume more power? Or would it then fail?

This means: When you connect such a lamp to a voltage of $24\text{ V}$,
then it will consume $5.0\text{ W}$ and shine as specified.
When you connect it to a higher voltage, then it will consume more power
and shine brighter. But it will probably burn through soon.
When connected to the recommended voltage $U=24\text{ V}$,
then this lamp will draw a current of
$I=\frac{P}{U}=\frac{5.0\text{ W}}{24\text{ V}}=0.208\text{ A}$.

If for example a power supply has current $8.0\text{ A}$ and
potential difference of $24\text{ V}$, ...

This means the power supply is capable to deliver a maximum
current of $8.0\text{ A}$. It does not mean it will always deliver
a current of $8.0\text{ A}$ regardless of which consumers ares connected
to it. If you connect only small consumers (or no consumer at all)
to the power supply, then it will deliver a smaller current
(or no current at all).

But if we were to have $30$ lamps for example, each lamp would receive $6.4\text{ W}$?

No. When you connect $30$ lamps in parallel to the $24\text{ V}$
power supply, then each lamp will still draw a current of $0.208\text{ A}$
(as calculated above) and consume a power of $5.0\text{ W}$.
All $30$ lamps together will draw a total current of
$I = 30\cdot 0.208\text{ A}=6.25\text{ A}$ and consume a total
power of $P=30\cdot 5.0\text{ W}=150\text{ W}$.
A: A statement like this, a power supply has current 8.0 A and potential difference of 24V, would usually mean that it is a (approximately constant) voltage source with a potential difference across the output terminal of 24V and a capability of supplying up to a maximum of 8A.
This means that whatever is connected across the terminals will have 24V across it and a current passing through it determined by its resistance.
So if the bulb had a working resistance of 24$\Omega$ a current of 1A would pass through it.
Connecting 2 such bulbs in parallel would mean that each bulb would have 1A passing through it at the voltage source would be delivering 2A.
The maximum number of bulbs which could be connected and be working properly is eight.
Your 24V, 5.0W bulb with 24V across it would draw a current of 5/24 $\approx$ 0.2A from a 24V supply.
So the voltage output of a power supply is fixed and the current given is the maximum current which the supply could supply if it was required to do so.
But if we were to have 30 lamps for example, each lamp would receive 6.4 W?
No, each bulb would draw 2A and the total current drawn from the supply would be  30 $\times$ 0.2 $\approx$ 6A.
If you wanted to run the bulbs at a higher wattage and thus reduce their lifetime then you have to apply a larger voltage across them.
