Is fasting on Sundays prohibited by some Church law or is it just not recommended generally? I was told that it is wrong to take up any penitential activities on Sundays.
The reason fasting on Sundays is not usually done is that fasting is generally considered a penitential exercise, and penitential exercises are normally lifted on a solemnity (which Sunday always is). This is why every Lent many people ask if whatever they gave up for Lent can be partaken of on the Sundays of Lent. Each Sunday is also a miniature celebration of Easter Sunday, which therefore is considered a day of celebration and rejoicing rather than penance.
However, that being said, personal spiritual fasting is not prohibited on Sundays. Catholics are free to fast in various ways in their personal spiritual journey, though it is recommended that they do so in consultation with a spiritual director.
Apart from the prescribed days of fast and abstinence on Ash Wednesday and Good Friday, and the days of abstinence every Friday of Lent, Catholics have traditionally chosen additional penitential practices for the whole Time of Lent. These practices are disciplinary in nature and often more effective if they are continuous, i.e., kept on Sundays as well. That being said, such practices are not regulated by the Church, but by individual conscience.