Riley was born in London and studied art first at Goldsmiths College and later at the Royal College of Art, where her fellow students included Peter Blake and Frank Auerbach. She left college early to look after her sick father, and suffered a mental breakdown shortly thereafter. After recovery she took on a number of jobs, including several as an art teacher.
Towards the end of the 1950s, Riley began to produce works in a style recognisably her own. This style came from a number of sources. A study of the pointillism of Georges Seurat, and subsequent landscapes produced in that style, led to an interest in optical effects. The paintings of Victor Vasarely, who had used designs of black and white lines since the 1930s, are an obvious influence. Particularly in later works, the influence of futurists, especially Giacomo Balla, can also be discerned.
Around the end of the 1950s, Riley began to paint the black and white works for which she is probably best known today. They present straight or wavy lines (sometimes instead discs or squares), which give the illusion of movement or colour. Works in this style made up her first solo show in London in 1962. Although mainly remembered today for the impressions of movement and colour they give through the exploitation of optical illusions, it is said that the impetus for Riley making these apparently cold and calculated works was a failed love affair. One of the more famous works in this style is Fall (1963).
Riley exhibited in the 1965 New York City show, The Responsive Eye, the exhibition which first drew attention to so-called op art. One of her paintings was reproduced on the cover of the show's catalogue, though Riley later became disillusioned with the movement, and expressed regret that her work was exploited for commercial purposes.
By the end of the 1960s, Riley was using a full range of colour. Sometimes lines of colour are used to give a shimmering effect, while other works fill the canvas with tessellating patterns. In many works since this period, Riley has employed others to do the painting, while she concentrates on the actual design of her work.
One of Riley's more unusual works came in 1983 when she designed the interior decoration of the Royal Liverpool Hospital. For this, she used bands of simple colour, rather than her usual more dazzling work. She has also designed sets for plays.
Riley won the International Prize for Painting at the 1968 Venice Biennale, and has had a number of major retrospective exhibitions held in several countries. In 1998 she was made a Companion of Honour.