The yield paid out on Government bonds is determined by a number of factors.
Firstly, at the issuance of the bond in an auction, primary dealers (eg. commercial banks) bid a certain amount of currency for bonds but at a minimum acceptable yield. Some dealers will bid a lower yield, some will bid a higher yield. The Government will put these bids in yield order and add up the total amount of currency bid. The bid with the highest yield that first fulfils the Government's goal (i.e. amount raised) sets the "stop-out" yield which is applied to ALL bids in the auction. The Treasury usually then sets the coupon rate on the bonds to be this stop-out yield. This ensures that the actual price paid for the bonds by the primary dealers equals their "face value".
Once this auction process has completed, those bonds are signed and delivered as contractual IOUs to the asset owner (eg. a bank). The coupon rate will be listed in currency (eg. $ or £) paid out on a semi-annual basis per bond. I.e. let's say a bond is sold at a price of £1000 with a face value of also £1000 (because the coupon rate was specifically chosen such that these two things equal each other upon initial issuance). The coupon rate might well be £20 per year on that bond. This represents a yield of 2%.
Now, if the price of that bond stays the same all the way through to maturity, the yield will also stay at 2%. However, because of secondary bond markets, the primary dealers can sell their bonds to other investors such as pension funds or ETFs. If market conditions means demand for bonds drops, their price also drops.
Let's say that the bond with a face value of £1000 is traded and sold at a discount price of £500 because no-one wants to buy it at £1000 anymore (one reason might be that other investments might give them a much greater return than 2% so they would choose them instead, despite the increased risk). The buyer has invested £500, but the coupon rate is still £20 per year for that bond. The buyer's yield is therefore 20/500 or 4%. The opposite is true when bonds appreciate in value. If there is strong demand for safe, risk-free assets such as Government bonds, a buyer might well be willing to buy the £1000 face-value (the price the Government would give them if they hold it to maturity) bond for £2000. In this case, the £20 coupon rate would represent a 1% yield for that buyer. Therefore, yields are inversely proportional to bond prices because the coupon rate is fixed for the life of the bond.
So, how can the two explanations in your question both be correct?
The answer comes from an understanding of what could impact the demand for Government bonds. In the first explanation, a strengthening economy with a burgeoning productive base may well offer lots of investment opportunities that, while riskier than bonds, offer much higher returns. Bond holders may well sell off their bonds in favour of shares in new companies being formed in this strong economy. As explained above, this drives the bond prices down, and therefore the bond yields up.
Simultaneously, in an economy which is going at maximum capacity, overheating is a possibility (which leads to inflation). Central banks may well target a higher interest rate in this scenario to slow down the economy slightly to prevent overheating as a precautionary measure. When they do this, interest paid on reserves held at the central bank might garner higher interest than bonds. This means owners of bonds might want to sell them in favour of interest-bearing reserves. Again, this would drive bond prices down and bond yields up.
In the second explanation, it is more reflective of a later stage in an economic cycle where inflation has reared its head. In this scenario, investors might expect the central bank to react by rising interest rates further to counter inflation. This means that they would demand higher yields on longer term bonds in any primary dealer auction. This lowers the price of outstanding long-term bonds as well and therefore increases bond yields. Once the central bank hike rates in response to inflationary conditions, short term interest rates (eg. inter-bank lending rates on reserves) can rise even more quickly.
Higher short-term interest rates can slow down consumer spending and business investment, thereby prompting poor economic conditions and slower growth.
So essentially, both explanations are referring to demand for Government bonds but for slightly different reasons at slightly different stages of an economic cycle.